import 'package:flutter/material.dart';
import '../widgets/form/DDSessionTitle.dart';
import '../widgets/form/DDReadField.dart';

// Create a Form Widget
class TestReadPage extends StatefulWidget {
  @override
  TestReadPageState createState() {
    return TestReadPageState();
  }
}

// Create a corresponding State class. This class will hold the data related to
// the form.
class TestReadPageState extends State<TestReadPage> {
  // Create a global key that will uniquely identify the Form widget and allow
  // us to validate the form
  //
  // Note: This is a GlobalKey<FormState>, not a GlobalKey<MyCustomFormState>!
  final _formKey = GlobalKey<FormState>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('车贷详情'),
        centerTitle: true,
      ),
      body: new Form(
        key: _formKey,
        child: Card(
          margin: EdgeInsets.all(10.0),
          child: Padding(
            padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
            child: ListView(
              children: <Widget>[
                new DDSessionTitle("借款人信息"),
                new DDReadField(
                  labelText: "姓名",
                  valueText: "陈小生",
                ),
                new DDReadField(
                  labelText: "性别",
                  valueText: "男",
                ),
                new DDReadField(
                  labelText: "出生日期",
                  valueText: "1981-05-03",
                ),
                new DDReadField(
                  labelText: "身份证号码",
                  valueText: "350626201210304426",
                ),
                new DDReadField(
                  labelText: "地址",
                  valueText: "XX省XX市XX县XX镇XX村XX号",
                ),
                new DDReadField(
                  labelText: "姓名",
                  valueText: "陈小生",
                ),
                new DDReadField(
                  labelText: "性别",
                  valueText: "男",
                ),
                new DDReadField(
                  labelText: "出生日期",
                  valueText: "1981-05-03",
                ),
                new DDReadField(
                  labelText: "身份证号码",
                  valueText: "350626201210304426",
                ),
                new DDReadField(
                  labelText: "地址",
                  valueText: "XX省XX市XX县XX镇XX村XX号",
                ),
                new DDReadField(
                  labelText: "姓名",
                  valueText: "陈小生",
                ),
                new DDReadField(
                  labelText: "性别",
                  valueText: "男",
                ),
                new DDReadField(
                  labelText: "出生日期",
                  valueText: "1981-05-03",
                ),
                new DDReadField(
                  labelText: "身份证号码",
                  valueText: "350626201210304426",
                ),
                new DDReadField(
                  labelText: "地址",
                  valueText: "XX省XX市XX县XX镇XX村XX号",
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
